﻿using System;
using System.Collections.Generic;

using KingsSharp.Core.Data;


namespace CRM.Admin.Contracts.Model.Sys
{
    /// <summary>
    /// 组织结构
    /// </summary>
    public class Organization : EntityBase<Guid>
    {
        /// <summary>
        /// 组织机构名称
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 排序号
        /// </summary>
        public int Order { get; set; }

        /// <summary>
        /// 机构编码
        /// </summary>
        public string Code { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        public string Remark { get; set; }

        /// <summary>
        /// 上级机构ID号
        /// </summary>
        public Guid? ParentOrganizationId { get; set; }

        /// <summary>
        /// 上级机构
        /// </summary>
        public virtual Organization Parent { get; set; }

        /// <summary>
        /// 子集合
        /// </summary>
        public virtual ICollection<Organization> Children { get; set; }

    }
}
